package com.bobi.ecofavor.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bobi.ecofavor.mapper.UserMapper;
import com.bobi.ecofavor.service.UserService;
import com.bobi.ecofavor.model.domain.User;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {
    @Override
    public User getUserByOpenId(String openId) {
        return super.getOne(Wrappers.lambdaQuery(User.class).eq(User::getWxOpenid, openId));
    }
}
